<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>随机点名</title>
</head>
<body>
    <div class="output"></div>
    <script>
        let arr = ['lemon', '智聪', '善婷', '宏基', '嘉斌']
        // 随机索引
        let randomIdx = parseInt(Math.random() * arr.length) // [0,5)
        document.querySelector('.output').innerText = arr[randomIdx]
    </script>
</body>
</html>